package com.string.test;

public class Connect {
    public static void main(String[] args) {
        int[] number={1,2,3,5,5,5};
        String c = connect(number);
        System.out.println(c);
    }
    public static String connect(int[] num){
        String result="[";
        for (int i = 0; i < num.length; i++) {
            result=result + num[i];
            if (i==num.length-1){
                break;
            }
            result+=",";
        }
        return result+"]";
    }
}
